<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"	
	template="/resources/scaffold/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{bankTransactionBean.id}"/>
		<f:event type="preRenderView" listener="#{bankTransactionBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Bank Transaction"/>

	<ui:define name="header">
		Bank Transaction
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty bankTransactionBean.id}">
				Edit existing Bank Transaction
			</c:when>
			<c:otherwise>
				Create a new Bank Transaction
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="bankTransactionBeanBankTransactionAmount" value="Amount:"/>
				<h:panelGroup>
					<h:inputText id="bankTransactionBeanBankTransactionAmount" required="true" value="#{bankTransactionBean.bankTransaction.amount}"/>
					<h:message for="bankTransactionBeanBankTransactionAmount" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="bankTransactionBeanBankTransactionCreatedOn" value="Created On:"/>
				<h:panelGroup>
					<h:inputText id="bankTransactionBeanBankTransactionCreatedOn" maxLength="10" value="#{bankTransactionBean.bankTransaction.createdOn}">
						<f:convertDateTime type="date"/>
					</h:inputText>
					<h:message for="bankTransactionBeanBankTransactionCreatedOn" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="bankTransactionBeanBankTransactionModifiedOn" value="Modified On:"/>
				<h:panelGroup>
					<h:inputText id="bankTransactionBeanBankTransactionModifiedOn" maxLength="10" value="#{bankTransactionBean.bankTransaction.modifiedOn}">
						<f:convertDateTime type="date"/>
					</h:inputText>
					<h:message for="bankTransactionBeanBankTransactionModifiedOn" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="bankTransactionBeanBankTransactionPurpose" value="Purpose:"/>
				<h:panelGroup>
					<h:inputText id="bankTransactionBeanBankTransactionPurpose" required="true" value="#{bankTransactionBean.bankTransaction.purpose}"/>
					<h:message for="bankTransactionBeanBankTransactionPurpose" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="bankTransactionBeanBankTransactionTableId" value="Table Id:"/>
				<h:panelGroup>
					<h:inputText id="bankTransactionBeanBankTransactionTableId" required="true" value="#{bankTransactionBean.bankTransaction.tableId}"/>
					<h:message for="bankTransactionBeanBankTransactionTableId" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="bankTransactionBeanBankTransactionBankId" value="Bank Id:"/>
				<h:panelGroup>
					<h:inputText id="bankTransactionBeanBankTransactionBankId" required="true" value="#{bankTransactionBean.bankTransaction.bankId}"/>
					<h:message for="bankTransactionBeanBankTransactionBankId" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="bankTransactionBeanBankTransactionCustomerId" value="Customer Id:"/>
				<h:panelGroup>
					<h:inputText id="bankTransactionBeanBankTransactionCustomerId" value="#{bankTransactionBean.bankTransaction.customerId}"/>
					<h:message for="bankTransactionBeanBankTransactionCustomerId" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="bankTransactionBeanBankTransactionType" value="Type:"/>
				<h:panelGroup>
					<h:inputText id="bankTransactionBeanBankTransactionType" value="#{bankTransactionBean.bankTransaction.type}"/>
					<h:message for="bankTransactionBeanBankTransactionType" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="bankTransactionBeanBankTransactionCreatedBy" value="Created By:"/>
				<h:panelGroup>
					<h:inputText id="bankTransactionBeanBankTransactionCreatedBy" value="#{bankTransactionBean.bankTransaction.createdBy}"/>
					<h:message for="bankTransactionBeanBankTransactionCreatedBy" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="bankTransactionBeanBankTransactionModifiedBy" value="Modified By:"/>
				<h:panelGroup>
					<h:inputText id="bankTransactionBeanBankTransactionModifiedBy" value="#{bankTransactionBean.bankTransaction.modifiedBy}"/>
					<h:message for="bankTransactionBeanBankTransactionModifiedBy" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="bankTransactionBeanBankTransactionDirection" value="Direction:"/>
				<h:panelGroup>
					<h:selectBooleanCheckbox id="bankTransactionBeanBankTransactionDirection" value="#{bankTransactionBean.bankTransaction.direction}"/>
					<h:message for="bankTransactionBeanBankTransactionDirection" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="bankTransactionBeanBankTransactionIsDeleted" value="Is Deleted:"/>
				<h:panelGroup>
					<h:selectBooleanCheckbox id="bankTransactionBeanBankTransactionIsDeleted" value="#{bankTransactionBean.bankTransaction.isDeleted}"/>
					<h:message for="bankTransactionBeanBankTransactionIsDeleted" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{bankTransactionBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty bankTransactionBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{bankTransactionBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{bankTransactionBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>